package com.ibeeking.gmc.global.service.common.enums;

public enum TaskJobTypeEnum {
    JOB_TYPE_ONCE(1, "一次性任务"),
    JOB_TYPE_CIRCLE(2, "循环性任务");

    private Integer type;
    private String desc;

    TaskJobTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByType(Integer type) {
        for (TaskJobTypeEnum enumObj : values()) {
            if (enumObj.getType().equals(type)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
